package com.imti.service;

import com.imti.model.Paper;
import com.imti.model.Question;
import com.imti.model.Repo;
import com.imti.model.Title;
import com.imti.model.dto.PaperTitle;
import com.imti.util.PageBean;
import org.springframework.ui.Model;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface PaperService {

    /**
     * 获取试卷管理列表
     * @return 试卷列表
     */
    public PageBean findAll(PageBean page, Paper paper);

    int addPaper(Paper paper);

    /**
     * 查询题库信息
     * @return
     */
    List<Repo> selectRepo();

    int saveRepo(Integer pid,Integer repo);

    int selectPaperId(String title);

    void selectPaperById(Integer id);

    List<PaperTitle> selectPaperTitleById(Integer id,Integer type);

    int deleteRepo(Integer id);

    /**
     * 展示试卷
     * @param id 试卷id
     */
    void showPaper(Integer id, HttpServletRequest request);
}
